package com.wkq.domain;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

//用户类
@Data
@AllArgsConstructor
@NoArgsConstructor
public class UserInfo {
    private String id;
    private String username;
    private String email;
    private String password;
    private String phoneNum;
    private Integer status;
    private String statusStr;
    private List<Role> roles;

    public String getStatusStr() {
        if (status != null) {
            if (status == 0) {
                statusStr = "未开启";
            }
            if (status == 1) {
                statusStr = "开启";
            }
        }
        return statusStr;
    }
}
